from pathlib import Path

from .utils import log_print, tip, short_rest

SETTING_PATH = './enclosure/setting.txt'
WEBDRIVER_PATH = './enclosure/chromedriver.exe'
FILE_ONE_PATH = './enclosure/Unused'
FILE_TWO_PATH = './enclosure/Used'


@tip.register('check directory')
def check():
    path_dict = {k: v for k, v in globals().items() if '_PATH' in k}
    for path in path_dict.values():
        if Path(path).exists() is False:
            log_print(f'"{path}" does not exist,please check!', log_level='warn')

    short_rest(time_interval=0.05)


check()
